-
Notifications
You must be signed in to change notification settings - Fork 418
Support splicing in ChannelContext::funding_tx_constructed
#3982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support splicing in ChannelContext::funding_tx_constructed
#3982
Conversation
👋 Thanks for assigning @wpaulino as a reviewer! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3982 +/- ##
==========================================
+ Coverage 88.94% 88.98% +0.04%
==========================================
Files 174 174
Lines 124201 124223 +22
Branches 124201 124223 +22
==========================================
+ Hits 110472 110544 +72
+ Misses 11251 11204 -47
+ Partials 2478 2475 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔔 1st Reminder Hey @wpaulino! This PR has been waiting for your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to squash
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
e309a6b
to
f3eb10b
Compare
CI is failing |
The ChannelState::NegotiatingFunding assertion check in ChannelContext::get_initial_commitment_signed will fail when implementing splicing's channel_reestablish logic. In order to support it and channel establishment, enter ChannelState::FundingNegotiated prior to calling the method and update the assertion accordingly. Also allows writing a channel in the FundedNegotiated state when an interactive signing session is active. This is necessary as it indicates a previously funded channel being spliced.
When ChannelContext::get_initial_commitment_signed is called for V2 channel establishment, any errors should result in closing the channel. However, in the future, when this is used for splicing it should abort instead of closing the channel. Move the error construction to the call sites in anticipation of this.
f3eb10b
to
63604cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge with just my approval after CI, the changes were fairly trivial.
The
ChannelState::NegotiatingFunding
assertion check inChannelContext::get_initial_commitment_signed
will fail when implementing splicing'schannel_reestablish
logic. In order to support it and channel establishment, enterChannelState::FundingNegotiated
prior to calling the method and update the assertion accordingly.Additionally, update relevant signing methods to use an
Option
instead of aResult
with aChannelError
since failures result in aTxAbort
anyhow.Commits from this PR were extracted from #3886 to facilitate splicing testing.